module.exports = function(data) {
    return new Player(data);
};

var Player = function(data) {
    this.uid = null;
    this.sid = null;        // 前端服务器ID
    this.hp = null;
    this.type = 1;          // 1表示是玩家
    this.name = null;
    this.x = null;
    this.y = null;
    for (var p in data) {
        this[p] = data[p];
    }
};